﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CCPnuts.Pack;
using CCPnuts.IFileSplit.Interfaces;

namespace CCPnuts.IFileSplit
{
    public class Merger : Viewer
    {
        #region Packed Target

        internal Merger(IPacked packed) : base(packed) { }

        internal new I_Merger Packed { get { return (I_Merger)base.Packed; } }

        #endregion

        #region Proxy Members

        #region Essential Members

        /// <summary>
        /// Gets or sets the output directory.
        /// </summary>
        public string TargetDirectory
        {
            get
            {
                try
                {
                    return Packed.TargetDirectory;
                }
                catch (Exception ex)
                {
                    throw ex.Pack("Exception @ Merger : TargetDirectory : Get");
                }
            }
            set
            {
                try
                {
                    Packed.TargetDirectory = value;
                }
                catch (Exception ex)
                {
                    throw ex.Pack("Exception @ Merger : TargetDirectory : Set");
                }
            }
        }

        #endregion

        #endregion
    }

    public static partial class PackedInfos
    {
        public static PackedInfo Merger { get { return new PackedInfo(p => new Merger(p)); } }
    }
}
